// webpack 在编译时，会静态地解析代码中的 require.ensure()，同时将模块添加到一个分开的 chunk 当中。
//const Detail = r => require.ensure([], () => r(require('../components/Detail')), 'Detail')
//const Home = r => require.ensure([], () => r(require('../components/Home')), 'Home')

import Vue from "vue";
import Router from "vue-router";
import ShopPage from "@/components/ShopPage";
import Category from "@/components/Category";
import Zone from '@/components/Zone';
import Test from '@/components/Test';
import ZoneDetail from '@/components/ZoneDetail';
import Search from '@/components/Search';
import Specific from '@/components/auciton/Specific';
////////////////////cmy///////////////////
import PaymentPage from '@/components/PaymentPage'
import Upload from '@/components/Upload'
import Record from '@/components/Record'
import AddEdit from '@/components/AddEdit'
import AddSite from '@/components/AddSite'
import AddressList from '@/components/AddressList'
import Application from '@/components/Application'
import NewcomerCourse from '@/components/NewcomerCourse'
import auctionSearch from '@/components/auctionSearch'
import MySale from '@/components/MySale';
import AreaIntro from '@/components/AreaIntro';
import OrderInfo from '@/components/OrderInfo';
import SellerOrderInfo from '@/components/SellerOrderInfo';
import AuctionSpecial from '@/components/AuctionSpecial';
import Complain from '@/components/Complain';
import PlainList from '@/components/PlainList';
import SutraArea from '@/components/SutraArea';
import PlainDetail from '@/components/PlainDetail';
import ExpertIntro from '@/components/ExpertIntro';
import Auction from '@/components/Auction';
import ActivePage from '@/components/ActivePage';
import Tweets from '@/components/Tweets';
import TweetList from '@/components/TweetList';
import ArtGallery from '@/components/ArtGallery';
import ArtistIntro from '@/components/ArtistIntro';
import Register from '@/components/Register';
import ForgetPass from '@/components/ForgetPass';
import ShopIntro from '@/components/ShopIntro';
import CertResult from '@/components/CertResult';
import MyFans from '@/components/MyFans';
import MyFollow from '@/components/MyFollow';
import BalanceDeposit from '@/components/BalanceDeposit';
import IncomeAddIdentify from '@/components/IncomeAddIdentify';
import MyCardList from '@/components/MyCardList';
import AddCardCert from '@/components/AddCardCert';
import FlowProgress from '@/components/FlowProgress'
import shopDetail from '@/components/shopDetail'
import ShopAdmin from '@/components/ShopAdmin'
import AdminDetail from '@/components/AdminDetail'
import WriteLogistics from '@/components/WriteLogistics'
import ClientReturn from "@/components/ClientReturn";
import SellerReturn from "@/components/SellerReturn";
import ClientReturnFlow from "@/components/ClientReturnFlow";

//activity
import LuckDraw from '@/activity/LuckDraw'
import VoteActivity from '@/activity/VoteActivity'
import EnrollOffice from '@/activity/EnrollOffice'
import VoteDetail from '@/activity/VoteDetail'
import VoteRank from '@/activity/VoteRank'
import VotePrice from '@/activity/VotePrice'
import ActiveFooter from "@/activity/ActiveFooter";
import MyPrize from "@/activity/MyPrize";
import test2 from "@/activity/test2";

//tribune
import HotList from '@/tribune/HotList'
import Thread from '@/tribune/Thread'
import AllComments from '@/tribune/AllComments'
import Publish from '@/tribune/Publish'
import MyCard from '@/tribune/MyCard'

//shop
import shopIndex from '@/shop/shopIndex'
import shopingDetial from '@/shop/shopingDetial'
import shopingComment from '@/shop/shopingComment'
import shopingCommentDetial from '@/shop/shopingCommentDetial'
import shopingOrder from '@/shop/shopingOrder'
import shopingInfo from '@/shop/shopingInfo'
//mall
import FillOrder from '@/mall/FillOrder'
import ShopCart from '@/mall/ShopCart'
import PayOrder from '@/mall/PayOrder'
import Invoice from '@/mall/Invoice'
import Question from '@/mall/Question'
import QuestionDetail from '@/mall/QuestionDetail'
import PaySuccess from '@/mall/PaySuccess'
import Comment from '@/mall/Comment'
import Star from '@/mall/Star'
import TradSuccess from '@/mall/TradSuccess'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/Home",
      name: "Home",
      component: () => import('@/components/home/Home'),
      meta: {
        keepAlive: true // 需要缓存
      }
    },
    {
      path: '/chart',
      name: 'chart',
      component: () => import('@/components/home/chart')
    },
    {
      path: "/test2",
      name: "test2",
      component: test2,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/Auction",
      name: "Auction",
      component: Auction,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/AuctionCategory/category_id/:category_id",
      name: "Specific",
      component: Specific,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/User",
      name: "User",
      component: () => import('@/components/user/index'),
      meta: {
        keepAlive: false // 需要缓存
      }
    },
    {
      path: "/shop/id/:id",
      name: "ShopPage",
      component: ShopPage,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/Category",
      name: "Category",
      component: Category,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/UserInfo",
      name: "UserInfo",
      component: () => import('@/components/user/UserInfo'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/PaymentPage/id/:id",
      name: "PaymentPage",
      component: PaymentPage,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/AllOrder",
      name: "AllOrder",
      component: () => import('@/components/user/AllOrder'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Detail/id/:id",
      name: "Detail",
      component: () => import('@/components/auciton/Detail'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/Upload",
      name: "Upload",
      component: Upload,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Upload/auction_id/:auction_id",
      name: "Upload",
      component: Upload,
      meta: {
        keepAlive: true
      }
    },

    //auction_id
    {
      path: "/Record/id/:id",
      name: "Record",
      component: Record,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/AddManage",
      name: "AddManage",
      component: () => import('@/components/user/AddManage'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/AddEdit/id/:id",
      name: "AddEdit",
      component: AddEdit,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/AddSite",
      name: "AddSite",
      component: AddSite,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Zone",
      name: "Zone",
      component: Zone,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/ZoneDetail/id/:id",
      name: "ZoneDetail",
      component: ZoneDetail,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/Test",
      name: "Test",
      component: Test,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Certification",
      name: "Certification",
      component: () => import('@/components/user/Certification'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/UserCert",
      name: "UserCert",
      component: () => import('@/components/cert/UserCert'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/StoreCert",
      name: "StoreCert",
      component: () => import('@/components/cert/StoreCert'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/OtherCert",
      name: "OtherCert",
      component: () => import('@/components/cert/OtherCert'),
      meta: {
        keepAlive: true
      }
    },

    {
      path: "/Attention",
      name: "Attention",
      component: () => import('@/components/home/Attention'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/MyStrack",
      name: "MyStrack",
      component: () => import('@/components/user/MyStrack'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/MessageCenter",
      name: "MessageCenter",
      component: () => import('@/components/user/MessageCenter'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/SendSale",
      name: "SendSale",
      component: () => import('@/components/user/SendSale'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/ShopReport",
      name: "ShopReport",
      component: () => import('@/components/user/ShopReport'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Search",
      name: "Search",
      component: Search,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/MyJoin",
      name: "MyJoin",
      component: () => import('@/components/user/MyJoin'),
      meta: {
        keepAlive: true
      }
    },

    {
      path: "/Application",
      name: "Application",
      component: Application,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Specific/category_id/:category_id",
      name: "Specific",
      component: Specific,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Identify",
      name: "Identify",
      component: () => import('@/components/Ident/Identify'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Export",
      name: "Export",
      component: () => import('@/components/Ident/Export'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/AppraisalDetail/:appraisal_number",
      name: "AppraisalDetail",
      component: () => import('@/components/Ident/AppraisalDetail'),
      meta: {
        keepAlive: true
      }
    },

    {
      path: "/AddressList",
      name: "AddressList",
      component: AddressList,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/NewcomerCourse",
      name: "NewcomerCourse",
      component: NewcomerCourse,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/auctionSearch",
      name: "auctionSearch",
      component: auctionSearch,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/MySale",
      name: "MySale",
      component: MySale,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/MyIncome",
      name: "MyIncome",
      component: () => import('@/components/user/MyIncome'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/BillDetail",
      name: "BillDetail",
      component: () => import('@/components/user/BillDetail'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/AreaIntro",
      name: "AreaIntro",
      component: AreaIntro,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/OrderInfo/order_sn/:order_sn",
      name: "OrderInfo",
      component: OrderInfo,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/SellerOrderInfo/order_sn/:order_sn",
      name: "SellerOrderInfo",
      component: SellerOrderInfo,
      meta: {
        keepAlive: false
      }
    },

    {
      path: "/AuctionSpecial",
      name: "AuctionSpecial",
      component: AuctionSpecial,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Complain/auction_id/:auction_id",
      name: "Complain",
      component: Complain,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/PlainList",
      name: "PlainList",
      component: PlainList,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/SutraArea",
      name: "SutraArea",
      component: SutraArea,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/PlainDetail/plaint_id/:plaint_id",
      name: "PlainDetail",
      component: PlainDetail,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/ExpertIntro/expert_id/:expert_id",
      name: "ExpertIntro",
      component: ExpertIntro,
      meta: {
        keepAlive: true
      }
    },

    {
      path: "/ActivePage/:special_code",
      name: "ActivePage",
      component: ActivePage,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/IdentifyInstruction",
      name: "IdentifyInstruction",
      component: () => import('@/components/Ident/IdentifyInstruction'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/AppProgress",
      name: "AppProgress",
      component: () => import('@/components/Ident/AppProgress'),
      meta: {
        keepAlive: true
      }
    },

    {
      path: "/Tweets/article_id/:article_id",
      name: "Tweets",
      component: Tweets,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/TweetList",
      name: "TweetList",
      component: TweetList,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/ArtGallery",
      name: "ArtGallery",
      component: ArtGallery,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/GroupNews",
      name: "GroupNews",
      component: () => import('@/components/user/GroupNews'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/ArtistIntro",
      name: "ArtistIntro",
      component: ArtistIntro,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/Register",
      name: "Register",
      component: Register,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/",
      name: "Login",
      component: () => import('@/components/Login/Login'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/ForgetPass",
      name: "ForgetPass",
      component: ForgetPass,
      meta: {
        keepAlive: true
      }
    },

    {
      path: "/ShopIntro",
      name: "ShopIntro",
      component: ShopIntro,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/CertResult",
      name: "CertResult",
      component: CertResult,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/MyFans",
      name: "MyFans",
      component: MyFans,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/MyFollow",
      name: "MyFollow",
      component: MyFollow,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/BalanceDeposit",
      name: "BalanceDeposit",
      component: BalanceDeposit,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/IncomeAddIdentify",
      name: "IncomeAddIdentify",
      component: IncomeAddIdentify,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/MyCardList",
      name: "MyCardList",
      component: MyCardList,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/AddCardCert",
      name: "AddCardCert",
      component: AddCardCert,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/FlowProgress/order_sn/:order_sn",
      name: "FlowProgress",
      component: FlowProgress,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/shopDetail",
      name: "shopDetail",
      component: shopDetail,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/ShopAdmin",
      name: "ShopAdmin",
      component: ShopAdmin,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/AdminDetail/admin_id/:admin_id",
      name: "AdminDetail",
      component: AdminDetail,
      meta: {
        keepAlive: false
      }
    },

    {
      path: "/ClientService",
      name: "ClientService",
      component: () => import('@/components/user/ClientService'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/SellerReturn/order_sn/:order_sn",
      name: "SellerReturn",
      component: SellerReturn,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/SellerReturn/return_sn/:return_sn",
      name: "SellerReturn",
      component: SellerReturn,
      meta: {
        keepAlive: false
      }
    },

    {
      path: "/ClientReturn/order_sn/:order_sn",
      name: "ClientReturn",
      component: ClientReturn,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/ClientReturnFlow/return_sn/:return_sn",
      name: "ClientReturnFlow",
      component: ClientReturnFlow,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/WriteLogistics/order_sn/:order_sn",
      name: "WriteLogistics",
      component: WriteLogistics,
      meta: {
        keepAlive: false
      }
    },
    //鉴宝活动
    {
      path: "/LuckDraw",
      name: "LuckDraw",
      component: LuckDraw,
      meta: {
        keepAlive: false
      }
    },

    {
      path: "/VoteActivity",
      name: "VoteActivity",
      component: VoteActivity,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/EnrollOffice/vote_id/:vote_id",
      name: "EnrollOffice",
      component: EnrollOffice,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/VoteDetail/item_id/:item_id",
      name: "VoteDetail",
      component: VoteDetail,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/VoteRank",
      name: "VoteRank",
      component: VoteRank,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/VotePrice",
      name: "VotePrice",
      component: VotePrice,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/MyPrize",
      name: "MyPrize",
      component: MyPrize,
      meta: {
        keepAlive: false
      }
    },
    //论坛
    {
      path: "/tribune/HotList",
      name: "HotList",
      component: HotList,
      meta: {
        keepAlive: true
      }
    },
    {
      path: "/tribune/Thread/thread_id/:thread_id",
      name: "Thread",
      component: Thread,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/tribune/AllComments/thread_id/:thread_id",
      name: "AllComments",
      component: AllComments,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/tribune/Publish",
      name: "Publish",
      component: Publish,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/tribune/MyCard",
      name: "MyCard",
      component: MyCard,
      meta: {
        keepAlive: false
      }
    }, {//------------------------------商城首页
      path: "/shop/shopIndex",
      name: "shopIndex",
      component: shopIndex,
      meta: {
        keepAlive: false//缓存
      }
    },
    {
      path: "/shop/shopingDetial",
      name: "shopingDetial",
      component: shopingDetial,
      meta: {
        keepAlive: false//缓存
      }
    },
    //商品详情
    {
      path: "/shop/shopingDetial/id/:id",
      name: "shopingDetial",
      component: shopingDetial,
      meta: {
        keepAlive: false
      }
    },
    //评论
    {
      path: "/shop/shopingComment/id/:id",
      name: "shopingComment",
      component: shopingComment,
      meta: {
        keepAlive: false//缓存
      }
    },
    //好文玩商城
    {
      path: "/FillOrder",
      name: "FillOrder",
      component: FillOrder,
      meta: {
        keepAlive: false
      }
    },
    //购物车
    {
      path: "/ShopCart",
      name: "ShopCart",
      component: ShopCart,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/PayOrder",
      name: "PayOrder",
      component: PayOrder,
      meta: {
        keepAlive: false
      }
    },
    //评论详情
    {
      path: "/shop/shopingCommentDetial",
      name: "shopingCommentDetial",
      component: shopingCommentDetial,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/shop/shopingOrder",
      name: "shopingOrder",
      component: shopingOrder,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/shop/shopingInfo",
      name: "shopingInfo",
      component: shopingInfo,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/shop/shopingInfo/order_sn/:order_sn",
      name: "shopingInfo",
      component: shopingInfo,
      meta: {
        keepAlive: false
      }
    },
    //发票
    {
      path: "/Invoice",
      name: "Invoice",
      component: Invoice,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/Question/id/:id",
      name: "Question",
      component: Question,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/QuestionDetail/qid/:qid",
      name: "QuestionDetail",
      component: QuestionDetail,
      meta: {
        keepAlive: false
      }
    },
    //支付成功
    {
      path: "/PaySuccess/pay_sn/:pay_sn",
      name: "PaySuccess",
      component: PaySuccess,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/Comment/order_sn/:order_sn",
      name: "Comment",
      component: Comment,
      meta: {
        keepAlive: false
      }
    },
    {
      path: "/Star",
      name: "Star",
      component: Star,
      meta: {
        keepAlive: false
      }
    },
    //交易成功
    {
      path: "/TradSuccess",
      name: "TradSuccess",
      component: TradSuccess,
      meta: {
        keepAlive: false
      }
    },

  ]
});
